package com.hmall.common.Feign.ItemFeign;

import com.hmall.item.pojo.PageResult;
import feign.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("item-service")
public interface Itemfeign {
    @GetMapping("/item/list")
    public PageResult page(@RequestParam("page") Integer page,
                           @RequestParam("size") Integer size);
    @PutMapping("/item/stock/{itemId}/{num}")
    public void reduce(@PathVariable("itemId") Long itemId,
                       @PathVariable("num") Long num);
}
